n = eval(input())
print(f'{n}',end='')
while n!=1:
    print('-->', end='')
    if n % 2==0:
        n=3*n+1
        print(f'{n}',end='')
    else:
        n=n//2
        print(f'{n}',end='')
